From: Bastien Nocera Date: Tue, 17 Jan 2017 14:01:01 +0000 (+0100) Subject: portalHelper: Handle Ctrl+W/Ctrl+Q to close window X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~594 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=d200fb1d146b2fe651b901d49b61fb57a3a2f59f;p=gnome-shell.git portalHelper: Handle Ctrl+W/Ctrl+Q to close window https://bugzilla.gnome.org/show_bug.cgi?id=764133 --- diff --git a/js/portalHelper/main.js b/js/portalHelper/main.js index 427fd85c5..39846420e 100644 --- a/js/portalHelper/main.js +++ b/js/portalHelper/main.js @@ -74,6 +74,8 @@ const PortalWindow = new Lang.Class({ this._webView.show(); this.maximize(); this.present_with_time(timestamp); + + this.application.set_accels_for_action('app.quit', ['q', 'w']); }, _syncTitle: function() { @@ -168,6 +170,10 @@ const WebPortalHelper = new Lang.Class({ this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(HelperDBusInterface, this); this._queue = []; + + let action = new Gio.SimpleAction({ name: 'quit' }); + action.connect('activate', () => { this.active_window.destroy(); }); + this.add_action(action); }, vfunc_dbus_register: function(connection, path) {